// 引入defineStore
import { reportDataApi } from "@/api/data";
import type { ReportDataModel } from "@/api/data/model";
import { defineStore } from "pinia";

interface DataStoreType {
    reportData:ReportDataModel;
}

// 创建一个小菠萝 
export const useDataStore = defineStore("data", {
    state:():DataStoreType=>{
        return {
            reportData:{},
        }
    },
    actions:{
      async getData() {
        const result = await reportDataApi();
        // console.log(result);
        this.reportData = result
        
      }
    },
    getters:{

    },
});

